<?php
//print_r($_SERVER);
session_start();
global $_SERVER;
error_reporting(E_ALL ^ E_NOTICE);
//include("includes/browserinfo.php"); 
include_once("includes/db_conn_new.inc");
$fname = ''; 
$name = '';
$amount = '';
$status = '';
$sendform = ''; 
$email = ''; 
    if(isset($_SESSION['applicant_id']))
	{	
		unset($_SESSION["applicant_id"]);
	}
	
	if(isset($_GET['name']))
	{
		$name=$_GET['name'];
		$name=str_replace('%20', ' ', $name);
		$name=explode(" ",$name);		
		$fname=trim($name[0]); $lname=trim($name[1]); 
	}
	
	if(isset($_SESSION['fb_email']))
	{	
		$email = $_SESSION["fb_email"];
	}
	
	if(isset($_GET['status']))
	{
		$status=$_GET['status'];
	}
	
	if(isset($_GET['amount']))
	{ 
		$amount=$_GET['amount'];
	}
	
	if(isset($_GET['sendfrom']))
	{
		$sendfrom=$_GET['sendfrom'];
	}
        
      $agent  = $_SERVER['HTTP_USER_AGENT'];
      $agentip=$_SERVER['REMOTE_ADDR'];
     $browser = '';
     $browser_ver = '';
     $browserinfo='';
  
     if (preg_match('/OmniWeb\/(v*)([^\s|;]+)/i', $agent, $regs))
     {
         $browser = 'OmniWeb';
         $browser_ver = $regs[2]; 
     }
  
     if (preg_match('/Netscape([\d]*)\/([^\s]+)/i', $agent, $regs))
     {
         $browser = 'Netscape';
         $browser_ver = $regs[2];
     }
  
     if (preg_match('/safari\/([^\s]+)/i', $agent, $regs)) 
     {
         $browser = 'Safari';
         $browser_ver = $regs[1];
     }
  
     if (preg_match('/MSIE\s([^\s|;]+)/i', $agent, $regs))
     {
         $browser = 'Internet Explorer';
         $browser_ver = $regs[1];
     }
  
     if (preg_match('/Opera[\s|\/]([^\s]+)/i', $agent, $regs))
     {
         $browser = 'Opera';
         $browser_ver = $regs[1];
     }
  
     if (preg_match('/NetCaptor\s([^\s|;]+)/i', $agent, $regs))
     {
         $browser = '(Internet Explorer ' .$browser_ver. ') NetCaptor';
         $browser_ver = $regs[1];
     }
  
     if (preg_match('/Maxthon/i', $agent, $regs))
     {
         $browser = '(Internet Explorer ' .$browser_ver. ') Maxthon';
         $browser_ver = '';
     }
  
     if (preg_match('/FireFox\/([^\s]+)/i', $agent, $regs))
     {
         $browser = 'FireFox';
         $browser_ver= $regs[1];
     }
	 
     if (preg_match('/Chrome\/([^\s]+)/i', $agent, $regs))
     {
         $browser = 'Chrome';
         $browser_ver= $regs[1];
     }
  
     if (preg_match('/Lynx\/([^\s]+)/i', $agent, $regs))
     {
         $browser = 'Lynx';
         $browser_ver = $regs[1];
     }
  
     if ($browser != '')
     {
        $browserinfo= $browser.' '.$browser_ver;
     }
     else
     {
         $browserinfo= 'Unknow browser';
     }
   
?>
<!DOCTYPE html>
<html lang="en">
<head>
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-49443465-1', 'maxcash.com.au');
  ga('send', 'pageview');

</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Same Day Payday Loans, Online Payday Loans, Payday Loans No Faxing - Max Cash</title>
<meta name="keywords" content="payday loans, online payday loans, personal loan, fast cash loans, cash loans, short term cash loans, bad credit loans, cash advance, no credit check loans, personal finance, instant cash loan, fast loans"/>
<meta name="description" content="Max Cash help solve financial hardship that you might have, we can provide fast cash loans to you, so you can be stress free."/>
<link rel='canonical' href='http://www.morgancash.com.au/' />
<link rel='next' title='Apply Now' href='http://www.morgancash.com.au/apply-now.php' />
<link rel="Shortcut Icon" href="/images/favicon.png" type="images/png" />
<link rel="icon" href="/images/favicon.png" type="images/png" />
<link rel="SHORTCUT ICON" href="/images/favicon.ico" />

<link type="text/css" rel="stylesheet" href="minify/min/?b=assets&amp;f=css/bootstrap.css,font-awesome/css/font-awesome.min.css,css/bootstrap-responsive.css,css/jquery-ui-1.10.0.custom.css,css/cost.css,custom.css" />

<!--[if IE 7]>
            <link rel="stylesheet" href="assets/css/font-awesome-ie7.min.css">
            <![endif]-->
<!--[if lt IE 9]>
            <link rel="stylesheet" type="text/css" href="assets/css/jquery.ui.1.10.0.ie.css"/>
            <![endif]-->
<!--[if gte IE 9]>
  <style type="text/css">
    .max-gradient {
       filter: none;  
    }
  </style> 
<![endif]-->

<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
      <script src="bootstrap/js/html5shiv.js"></script>
    <![endif]-->
<!--<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
-->
<script type="text/javascript" src="minify/min/?b=assets/js&amp;f=jquery-1.9.0.min.js,bootstrap.min.js,jquery-ui-1.10.0.custom.min.js,jquery.ui.touch-punch.min.js,cost.js"></script>

<style type="text/css">
#declined {
	width: 980px;
	margin: 0 auto;
	padding: 10px;
	font: bold 14px Arial, Helvetica, sans-serif;
	background: #FFFFC6;
	border-right: 2px solid #4B4B4B;
	border-left: 2px solid #4B4B4B;
	border-bottom: 2px solid #4B4B4B;
	-webkit-border-bottom-right-radius: 10px;
	-webkit-border-bottom-left-radius: 10px;
	-moz-border-radius-bottomright: 10px;
	-moz-border-radius-bottomleft: 10px;
	border-bottom-right-radius: 10px;
	border-bottom-left-radius: 10px;
	box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.3);
	line-height: 140%;
}
.btn-grey {
	background-color: #CCC;
	background-image: linear-gradient(to bottom, #CCC, #757575);
	background-repeat: repeat-x;
	border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
	color: #FFFFFF;
	text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.btn-grey:hover {
	background: #515151;
	color: #FFF;
}
#tech-help-btn{
	cursor: pointer;
background-color: #3da1dc;
color: #FFF;
border-radius: 4px;
text-align: center;
margin-top: 38px;
margin-bottom: 10px;
margin-right: 20px;
padding: 7px;
margin-left: 70px;"
}
#tech-help-panel{
	position:absolute;
	left:-200px;	
	top:50%;
	margin-top:-75px;
	z-index:9999;
}
#talktous{
	display:block;
	background:#fff;
	padding:2px;
	width:60px;
	text-align:center;	
	margin:6px auto 0 auto;
	cursor:pointer;
	border-radius:5px;
}
.row-fluid{
	margin-left:20px;
}
@media (max-width: 767px) {
	#tech-help-btn{
	cursor: pointer;
background-color: #3da1dc;
color: #FFF;
text-align: center;
margin-top: -67px; 
margin-bottom: 54px;
margin-right: 20px;
margin-left: 71%;
}
}
</style>


<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true&libraries=places&languages=en-AU"></script>

<script type="text/javascript">

$(document).ready(function(){ 
		var rmoney = 'applynow';
	$( "#confirmpassword" ).focusout(function(){
		var password=$('#loginpassword').val();
		var confirmpassword=$('#confirmpassword').val();
		if(password!=confirmpassword)
		{
			$("#passwordNotMatch").text("Password Not Match");
			$("#passwordNotMatch").show();
			return false;
		}
		else 
		{
			$("#passwordNotMatch").hide();
		}
	});	
	
	$( "#next" ).click(function(){
		var password=$('#loginpassword').val();
		var confirmpassword=$('#confirmpassword').val();
		if(password!=confirmpassword)
		{
			$("#passwordNotMatch").text("Password Not Match");
			$("#passwordNotMatch").show();
			return false;
		}
		else 
		{
			$("#passwordNotMatch").hide();
		}
	});					
});
</script>

<style>
@media (min-width: 768px) {
}
</style>
</head>
<body>
<div class="bodyBgGradient">
  <div class="bodyBgImage">
    <div id="wrapper" class="container-fluid" >
      <div id="header">
        <div class="row-fluid">
          <div class="span4"><a href="index.php" id="logo"><img src="graphics/logo.png"  alt="MaxCash" /></a></div>
          <div class="span3 offset5">
      <div id="tech-help-btn" class="isOpen">Help</div>
      
       
          </div>
        </div>
      </div>
      <div id="content">
        <div class="clearfix"></div>
        <div id="context" class="contrast">
          <?php include("includes/mobilewarning.php");?>
          <?php include("includes/noscriptwarning.php");?>
          <?php include("includes/nocookiewarning.php");?>
          <h3>Start Your Application</h3>
          <form action="includes/applynowformfileds.php" method="post" id="formApp" enctype="multipart/form-data" class="formapp" autocomplete="off" style="margin-left:0px;"/>
          
          <?php 
		if($_SESSION["ERROR"]!='')
			echo $_SESSION["ERROR"];
                unset($_SESSION["ERROR"]);
		?>
          <fieldset class="step" id="generalDetails">
<div class="well loanamt">
    <div class="row-fluid"  style="margin-left:0px;">
        <p><strong> How much cash would you like?</strong> </p>
        <div class="wrap rounded" >
                <strong class="pull-left">$300</strong><span class="pull-right">$2000</span>
                <div id="loan-range">
                <p>&nbsp;</p>
              <input class="hidden" id="amount"  type="text" value="" readonly/>
            </div>
                
        </div>
    </div>
<br>
<br>

    <div class="row-fluid" style="margin-left:0px;">
        <p><strong> How long do you want the loan for?</strong> </p>
        <div class="wrap rounded" >
                <strong class="pull-left">1 Month</strong> <span class="pull-right">6 Month</span>
           <div id="term-range">
           <p>&nbsp;</p>
                   <input class="hidden" id="term"  type="text" readonly/>
                </div>
               
        </div>
    </div>
<br>
<br>
     <div class="row-fluid" style="margin-left:0px;">
     <div class="span10 text-right"><br />
                  <strong> Weekly Repayment</strong>
                   </div>
                <div class="span2 text-right">
                  <div class="input-prepend"> <span class="add-on">$</span>
                    <input id="weekly_repayment" size="3" value="32" class="span8" type="text" readonly>
                  </div>
                </div>
             
              <input type="hidden" name="LoanAmount" id="LoanAmount" value="<?php echo $loan_amount; ?>" />
              <input type="hidden" name="due_month" id="due_month" value="<?php echo $term; ?>" />
              <input type="hidden" name="browser" id="browser" value="<?php echo $browserinfo; ?>" />
              <input type="hidden" name="ipaddress" id="ipaddress" value="<?php echo $agentip; ?>" />
   
     </div>
  </div>
            <h2><img src="assets/css/images/bullet-form.png"/>Personal Information</h2>
            <div class="row-fluid">
              <div class="span4 control-group">
                <label>First Name <span class="text-error">*</span> <a href="#" data-toggle="tooltip" title="As it appears on your driver's licence"><i class="fa fa-info-circle"></i> </a></label>
                <input  type="text" class="required capitalize" name="FirstName1" id="FirstName1" value="">
              </div>
              <div class="span4 control-group">
                <label>Middle Name</label>
                <input  type="text" name="MiddleName1" id="MiddleName1" class="capitalize" >
              </div>
              <div class="span4 control-group">
                <label>Surname <span class="text-error">*</span> <a href="#" data-toggle="tooltip" title="As it appears on your driver's licence"><i class="fa fa-info-circle"></i> </a></label>
                <input type="text" class="required capitalize" name="Surname1" id="Surname1" value="" >
              </div>
            </div>
            <div class="row-fluid">
              <div class="span4 control-group">
                <label>Title</label>
                <select name="Title1" class="required" id="Title1">
                  <option value="">-Select-</option>
                  <option value="Mr">Mr</option>
                  <option value="Ms">Ms</option>
                  <option value="Miss">Miss</option>
                  <option value="Mrs">Mrs</option>
                  <option value="Dr">Dr</option>
                  <option value="Other">Other</option>
                </select>
              </div>
              <div class="span4 control-group ">
                <label>Citizenship <span class="text-error">*</span></label>
                <select name="Residency1" id="Residency1" class="required norm" >
                  <option value="" selected="selected">-Select-</option>
                  <option value="Australian - Born in Australia">Australian - Born in Australia</option>
                  <option value="Australian - Born overseas">Australian - Born overseas</option>
                  <option value="Permanent Resident (PR)">Permanent Resident (PR)</option>
                  <option value="New Zealand Citizen &amp; Australian PR">New Zealand Citizen &amp; Australian PR</option>
                  <option value="Working Visa (457)">Working Visa (457)</option>
                  <option value="Others">Others</option>
                </select>
              </div>
              <div class="span4 control-group ">
                <label>Date of Birth <span class="text-error">*</span></label>
                <input name="DateOfBirth" type="text" class="dateOfBirth1 required input-medium" id="DateOfBirth" value="" size="10">
              </div>
            </div>
            <h2><img src="assets/css/images/bullet-form.png"/>Contact Information</h2>
            <div class="row-fluid">
              <div class="span4 control-group ">
                <label>Home Address <span class="text-error">*</span></label>
                <input type="text" name="ResidentialAddress1" id="ResidentialAddress1" value="" class="required capitalize" placeholder="e.g. 8 George St, Sydney NSW 2220" >
              </div>
              <div class="span4 control-group ">
                <label>Residential Status <span class="text-error">*</span> </label>
                <select name="ResidentialStatus1" id="ResidentialStatus1" class="required norm" >
                  <option value="">-Select-</option>
                  <option value="I own my home outright">I own my home outright</option>
                  <option value="I have a mortgage">I have a mortgage</option>
                  <option value="boarding">I am boarding</option>
                  <option value="renting">I am renting</option>
                </select>
              </div>
              <div class="span4">
                <label>No. of dependant under 18</label>
                <select name="NumberofDependant1" id="NumberofDependant1" class="ui-wizard-content valid ">
                  <option value="0" selected="selected">0</option>
                  <option value="1">1</option>
                  <option value="2">2</option>
                  <option value="3">3</option>
                  <option value="4">4</option>
                  <option value="5">5</option>
                </select>
              </div>
            </div>
            <div id="addressicon" style="display:none">
              <div class="row-fluid">
                <div class="span3">
                  <div class="fieldrow editor full" >
                    <label>Street Number <span class="text-error">*</span></label>
                    <input type="text" name="Number1" id="Number1" value="" class="required" />
                  </div>
                </div>
                <div class="span3">
                  <div class="fieldrow editor full" >
                    <label>Street <span class="text-error">*</span> </label>
                    <input type="text" name="Street1" id="Street1" value="" class="required" />
                  </div>
                </div>
                <div class="span3 control-group ">
                  <div class="fieldrow editor full" >
                    <label>Street Type<a href="#" data-toggle="tooltip" title="(LINE,RD)"><i class="fa fa-info-circle"></i> </a> <span class="text-error">*</span></label>
                    <input type="text" name="StreetType1" id="StreetType1" class="required"  onblur="nameMerge(this.id)" value="<?php echo $StreetType1; ?>" />
                  </div>
                </div>
              </div>
              <br />
              <div class="row-fluid">
                <div class="span4 control-group ">
                  <div class="fieldrow editor full" >
                    <label>Suburb <span class="text-error">*</span></label>
                    <input type="text" name="Suburb1" id="Suburb1" value="" class="required" />
                  </div>
                </div>
                <div class="span4 control-group ">
                  <div class="fieldrow editor full" >
                    <label>State <span class="text-error">*</span></label>
                    <input type="text" name="State1" id="State1" value="" class="required" />
                  </div>
                </div>
                <div class="span4 control-group ">
                  <div class="fieldrow editor full" >
                    <label>Postcode <span class="text-error">*</span></label>
                    <input type="text" name="Postcode1" id="Postcode1" value="" class="required" />
                  </div>
                </div>
              </div>
            </div>
            <div class="row-fluid">
              <div class="span4 control-group ">
                <label>Mobile Phone <a href="#" data-toggle="tooltip" title="eg:0400 000 000"><i class="fa fa-info-circle"></i> </a> </label>
                <input  type="text" name="Mobile1" class="Mobile uniqueMobileClass" id="Mobile1" maxlength="12" value="" placeholder="e.g. 04 4444 4444" >
              </div>
              <div class="span4 control-group ">
                <label>Home Phone </label>
                <input type="text" name="Phone1" id="Phone1" class="Phone uniquePhoneClass" value=""  placeholder="e.g. 09 2579 1130" />
              </div>
              <div class="span4 control-group ">
                <label>Email <a href="#" data-toggle="tooltip" title="Email is crucial for communication during the application process. "><i class="fa fa-info-circle"></i> </a> </label>
                <input type="text" name="EMailAddress1" id="EMailAddress1"  value="<?php if(isset($email)) echo $email; ?>" placeholder="e.g. email@example.com" class="required email uniqueEmailClass">
              </div>
            </div>
            <div class="row-fluid">     
              <div class="span4 control-group">
                <label>Loan Purpose <span class="text-error">*</span> </label>
                <select id="PurposeOfLoan1 " name="PurposeOfLoan1" class="required" >
                  <option value="">-Select-</option>
                  <option value="Personal bills/purchases">Personal bills/purchases</option>
                  <option value="Rental bond">Rental bond</option>
                  <option value="Holiday/Wedding">Holiday/Wedding</option>
                  <option value="House renovation">House renovation</option>
                  <option value="Debt consolidation">Debt consolidation</option>
                  <option value="Business related purpose">Business related purpose</option>
                  <option value="Other personal purpose">Other personal purpose</option>
                </select>
              </div>
              </div>
            
          </fieldset>
          <fieldset class="step third-assets" id="assetLiability">
            <h2><img src="assets/css/images/bullet-form.png"/>Employment</h2>
            <div class="row-fluid">
              <div class="span4">
                <label>Employment Status <span class="text-error">*</span> </label>
                <select name="TypeOfEmployment1" id="TypeOfEmployment1" class="typeofEmployement required norm">
                  <option value="Employee" selected="selected">Employee</option>
                  <option value="CentrelinkAndWorkincome">Employee + Centrelink Income</option>
                  <option value="Centrelink">Centrelink Income</option>
                  <option value="Self-Employed">Self-Employed</option>
                  <option value="Company Director">Company Director</option>
                  <option value="Contractor">Contractor</option>
                  <option value="Cash Income">Cash Income</option>
                  <option value="Others">Others</option>
                </select>
              </div>
              <div class="span4 control-group ">
                <label>Job Title <span class="text-error">*</span> </label>
                <input  type="text" name="TitleInOccupation1" id="TitleInOccupation1 " class="required" value="" >
              </div>
              <div class="span4 control-group ">
                <label>Employer Name <span class="text-error">*</span></label>
                <input type="text" name="BusinessName1" id="BusinessName1 " value="" class="capitalize required" >
              </div>
            </div>
            <div class="row-fluid ">
              <div class="span4 control-group ">
                <label>H.R. Contact Number<span class="text-error">*</span> </label>
                <input  type="text" class="required" name="WorkPhone1" id="WorkPhone1 " value="">
              </div>
            
              <div class="span4 control-group input-append">
                <label>Work Income After Tax <span class="text-error">*</span> </label>
                <input name="IncomeAfterTax1" type="text"  id="IncomeAfterTax1" value="" size="10" class="decimal required currency liabilities phly span4" placeholder="$">
                <select  name="IncomeAfterTax1Period" id="IncomeAfterTax1Period"  class="incomeperiod required small re-payment btn">
                  <!--<option selected="selected" value=""> - Select - </option>-->
                  <option value="Weekly" selected="selected">Weekly</option>
                  <option value="Fortnightly">Fortnightly</option>
                  <option value="Monthly">Monthly</option>
                </select>
              </div>
            </div>
            <hr>
            <h2><img src="assets/css/images/bullet-form.png"/>Expenses</h2>
            <p class="text-error"><strong >"Full disclousure is vital to your loan application"</strong></p>
            <hr>
            <div class="row-fluid ">
<div class="span4 control-group input-append">
                <label>Loan repayments <span class="text-error">*</span> </label>
                <input name="Liabilities[LoanRepayment][payment]" type="text"  id="PersonalLoanPayment" value="" size="10" class="decimal currency liabilities phly span4" placeholder="$" onBlur="totalpaymentCalculation()">
                <select  name="LoanRepaymentPeriod" id="LoanRepaymentPeriod"  class="ui-wizard-content valid required small re-payment btn">
                 <option selected="selected" value=""> - Select - </option>
                  <option value="Weekly" selected="selected">Weekly</option>
                  <option value="Fortnightly">Fortnightly</option>
                  <option value="Monthly">Monthly</option>
                </select>
              </div>
              
            <div class="span4 control-group input-append">
                <label>Credit Card repayment:<span class="text-error">*</span> </label>
                <input name="Liabilities[CreditCard][payment]" type="text"  id="CreditCardPayment" value="" size="10" class="liabilities phly span4" placeholder="$" onBlur="totalpaymentCalculation()">
                <select  name="CreditCardPaymentPeriod" id="CreditCardPaymentPeriod"  class="ui-wizard-content valid  small re-payment btn">
                 <option selected="selected" value=""> - Select - </option>
                  <option value="Weekly" selected="selected">Weekly</option>
                  <option value="Fortnightly">Fortnightly</option>
                  <option value="Monthly">Monthly</option>
                </select>
              </div>  
            </div>
            
            <div class="row-fluid ">
              <div class="span4 control-group input-append">
                <label>Boarding/Renting Fee
                  (Your Share)<span class="text-error">*</span> </label>
                <input name="Liabilities[BoardingRentingFee][payment]" type="text"  id="BoardingRentingFee" value="" size="10" 
                class="liabilities phly span4" placeholder="$" >
                <select  name="BoardingRentingPeriod" id="BoardingRentingPeriod"  class="ui-wizard-content valid  small re-payment btn">
                 <option selected="selected" value=""> - Select - </option>
                  <option value="Weekly" selected="selected">Weekly</option>
                  <option value="Fortnightly">Fortnightly</option>
                  <option value="Monthly">Monthly</option>
                </select>
              </div> 
              
              <div class="span4 control-group input-append">
                <label>Other Living Expense <span class="text-error">*</span> <a href="#" data-toggle="tooltip" title="Excluding renting fee, boarding fee, and mortgage."><i class="fa fa-info-circle"></i> </a> </label>
                <input name="Liabilities[LivingExpenses][payment]" type="text"  id="LivingExpensesPayment" value="" size="10" 
                class="liabilities phly required span4" placeholder="$" >
                <select  name="LivingExpensesPeriod" id="LivingExpensesPeriod"  class="ui-wizard-content valid  small re-payment btn">
                 <option selected="selected" value=""> - Select - </option>
                  <option value="Weekly" selected="selected">Weekly</option>
                  <option value="Fortnightly">Fortnightly</option>
                  <option value="Monthly">Monthly</option>
                </select>
              </div> 
            </div>
          </fieldset>
          <fieldset class="step fifth-credit" id="done">
            <h2><img src="assets/css/images/bullet-form.png"/>Credit History</h2>
            <div class="row-fluid">
              <div class="span6">
                <div class="form-horizontal">
                  <div class="control-group">
                    <label class="control-label">Have you ever applied for hardship? <span class="text-error">*</span></label>
                    <div class="controls">
                      <input <?php if(isset($applicant_hardship) && $applicant_hardship == 'No') echo 'checked="checked"' ?> name="Hardship1" type="radio" value="No" id="Hardship1No" class="required HardshipNo" >
                      No
                      <input <?php if(isset($applicant_hardship)  && $applicant_hardship == 'Yes') echo 'checked="checked"' ?> name="Hardship1" type="radio" value="Yes" id="Hardship1Yes" class="HardshipYes" >
                      Yes </div>
                  </div>
                </div>
              </div>
              
              
              <div class="span6">
                <div class="form-horizontal">
                  <div class="control-group">
                    <label class="control-label">Have you got a loan from anywhere in last 3 months? <span class="text-error">*</span></label>
                    <div class="controls">
                      <input <?php if(isset($applicant_gambling) && $applicant_gambling == 'No') echo 'checked="checked"' ?> name="Gambling1" type="radio" value="No" id="Gambling1No" class="required GamblingNo"  >
                      No
                      <input <?php if(isset($applicant_gambling)  && $applicant_gambling == 'Yes') echo 'checked="checked"' ?> name="Gambling1" type="radio" value="Yes" id="Gambling1Yes" class="GamblingYes" >
                      Yes </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="row-fluid">
              <div class="span6">
                <div class="form-horizontal">
                  <div class="control-group">
                    <label class="control-label">Your credit history <span class="text-error">*</span><a href="#" data-toggle="tooltip" title="If you are not sure, please select the most likely option.."><i class="fa fa-info-circle"></i> </a></label>
                    <?php 
			$arr_chistory[] = 'Clean (no default)'; 
			$arr_chistory[] = '1 default'; 
			$arr_chistory[] = '2 defaults'; 
			$arr_chistory[] = '3 or more defaults'; 
			$arr_chistory[] = 'Under bankruptcy'; 
			$arr_chistory[] = 'Ex-bankrupt'; 
			$arr_chistory[] = 'Under Part IX debt agreement'; 
			$arr_chistory[] = 'Past Part IX debt agreement'; 
			?>
                    <select name="CreditHistory1" id="CreditHistory1" class="chistory required norm controls comnhistry">
                      <option value="">-Select-</option>
                      <?php foreach($arr_chistory as $chistory): ?>
                      <?php if(isset($applicant_credit_history) && $applicant_credit_history == $chistory): ?>
                      <option value="<?php echo $chistory; ?>" selected="selected"><?php echo $chistory; ?></option>
                      <?php else: ?>
                      <option value="<?php echo $chistory; ?>"><?php echo $chistory; ?></option>
                      <?php endif; ?>
                      <?php endforeach; ?>
                    </select>
                    <div id="1defaulthtml1" name="1defaulthtml1" class="defaulthtml" width="100%">
                      <label class="control-label">Total outstanding value <span class="text-error">*</span></label>
                      <span class="fieldIcon"></span>
                      <input type="text" class="capitalize currency minAmt controls comnhistry" name="totalOutstanding1" id="totalOutstanding1" />
                    </div>
                    <div class="xbankrupt">
                      <label class="control-label">Discharge date<span class="text-error">*</span></label>
                      <span class="fieldIcon"></span>
                      <input type="text" class="required controls comnhistry" id="DateOfDischarge1" name="DateOfDischarge1" value="">
                      <label class="control-label">Did you have any default after discharge? <span class="text-error">*</span></label>
                      <span class="fieldIcon"></span>
                      <input type="text" class="required controls default" id="DefaultAfterDischarge1" name="DefaultAfterDischarge1" value="" >
                    </div>
                  </div>
                </div>
              </div>
              <div class="span6">
                <div class="form-horizontal">
                  <div class="control-group">
                    <label  class="control-label" for="ExistingClient">Have you taken out a loan with us before? <span class="text-error">*</span> <a href="#" data-toggle="tooltip" title="If a loan has not be taken out before, click No."><i class="fa fa-info-circle"></i> </a></label>
                    <span class="fieldIcon"></span>
                    <div class="controls">
                      <input <?php if(isset($ExistingClient)  && $ExistingClient == 'Yes') echo 'checked="checked"' ?> name="ExistingClient" type="radio" value="Yes" id="ExistingClient_yes" class="required" controls >
                      No
                      <input <?php if(isset($ExistingClient) || $ExistingClient == 'No') echo 'checked="checked"' ?> name="ExistingClient" type="radio" value="No" id="ExistingClient_no" class=""  >
                      Yes </div>
                  </div>
                </div>
              </div>
            </div> 
            <h2><img src="assets/css/images/bullet-form.png"/>Create an application account</h2>
<div class="row-fluid">
    <div class="offset4 span4">
        <a href="javascript:;" name="caccount" id="caccount" data="showtoggle" class="btn btn-green  btn-large" >Create Your Account</a>
    </div><br><br><br>
     <div class="pass offset4 span4">
                    <p class="text-center">The email address you input will be your username, please set the password.</p>
                    <div class="form-horizontal">
                       <div class="control-group">
                           <label for="loginpassword" >Password</label>
                           <input class="required" type="password" id="loginpassword" name="loginpassword">
                       </div>
                       <div class="check"> 
                           <div class=" control-group">
                               <label>Confirm Password</label>
                               <input class="required" type="password" id="confirmpassword"  name="confirmpassword">
                               <div id="passwordNotMatch" style="color:#F00; float:right"></div>
                           </div> 
                       </div>
                      
                   </div>
               </div>
               <div class="offset4 span4 control-group">  
 
							<?php $fbuser = false; 
                           if(isset($_SESSION['fb_user_id']) && $_SESSION['fb_user_id'] != ''): $fbuser = true; ?> 
                           <input type="hidden" value="<?php echo $_SESSION['fb_user_id']; ?>" name="social_user_id" />
                            <a id="social_logout" route="logout" class="btn btn-large span9" href="#">
                            <i class="fa fa-facebook-square"></i>Facebook Logout</a>
                           <a id="fbconnect" class="btn btn-large btn-block" style="display:none;" href="#"></a>
                        
                           <?php else: ?>
                          <a id="social_logout" route="logout" class="btn btn-large span9" style="display:none;" href="#">
                          <i class="fa fa-facebook-square"></i> Facebook Logout</a>
                           <a id="fbconnect" class="btn btn-large span9" 
						   <?php //if($fbuser) echo 'data="disabled" style="cursor:not-allowed;"'; ?> href="#">
                           <i class="fa fa-facebook-square"></i>  Use Facebook Account</a>
                           <?php endif; ?>
</div> 
</div>
               
 




<!--<div class="row-fluid">
                   <div class="pass">
                    <p class="text-center">The email address you input will be your username, please set the password.</p>
                    <div class="form-horizontal offset4">
                       <div class="control-group">
                           <label for="loginpassword" >Password</label>
                           <input class="required" type="password" id="loginpassword" name="loginpassword">
                       </div>
                       <div class="check">
                           <div class=" control-group">
                               <label>Confirm Password</label>
                               <input class="required" type="password" id="confirmpassword"  name="confirmpassword">
                               <div id="passwordNotMatch" style="color:#F00; float:right"></div>
                           </div> 
                       </div>
                      
                   </div>
               </div>
              </div>
<div class="row-fluid">
<div class="offset4 span4 control-group">
 
							<?php $fbuser = false; 
                           if(isset($_SESSION['fb_user_id']) && $_SESSION['fb_user_id'] != ''): $fbuser = true; ?> 
                           <input type="hidden" value="<?php echo $_SESSION['fb_user_id']; ?>" name="social_user_id" />
                            <a id="social_logout" route="logout" class="btn  btn-primary" href="#"><i class="fa fa-facebook-square"></i>Disconnect With Facebook</a>
                           <a id="fbconnect" class="btn btn-large btn-block" style="display:none;" href="#"></a>
                        <!--<a id="diff_social" href="#">Use Different Account</a>-->
                           <?php else: ?>
                          <!-- <a id="social_logout" route="logout" class="btn btn-primary" style="display:none;" href="#"><i class="fa fa-facebook-square"></i>Disconnect With Facebook</a>
                           <a id="fbconnect" class="btn btn-large btn-primary" 
						   <?php //if($fbuser) echo 'data="disabled" style="cursor:not-allowed;"'; ?> href="#">
                           <i class="fa fa-facebook-square"></i>  Connect With Facebook</a>
                           <?php endif; ?>
</div>
</div>-->

               
            <div class="row-fluid" >
              <p class="text-info"><a href="">Privacy Protection Policy </a> </p>
              <p>I/we acknowledge that I/we have provided truthful, correct and accurate information on this application form. We are informed that use of counterfeit document(s) and/or false information to obtain credit is a criminal offence. </p>
              <label>
                <input type="checkbox" id="AgreePrivacyCredit" name="AgreePrivacyCredit" class="required" value="AgreePrivacyCredit">
                I/we have read and agreed to the privacy and credit information before 
                applying for this loan. </label>
            </div>
          </fieldset>
          <div class="row-fluid">
            <input class="btn btn-green  btn-large span2 pull-right" id="next" value="Next" type="submit" onClick="$('#preapppass, #preappfail, #disclaimer, #bankrupt,#spec').hide();" style="margin-left:20px" />
            <input id="back" value="Back" type="reset" class="btn btn-grey btn-large span2 pull-right"/>
          </div>
          <a href="#" id="disableWizard">Show All Pages</a> <a href="#" id="showBUI" style="color:#f5f5f5; cursor:default">Show</a>
          </form>
        </div>
        <script type="text/javascript">
		$(document).ready(function(){
								   
		$(window).load(function(){
       // $('.pass').toggle('hide');
    });
   
  $("#caccount").click(function(e){
	e.preventDefault();
	
	var caccount = $(this).attr('data');
	if(caccount == "showtoggle")
	{
		$(".pass").toggle();
		$(this).attr('data', 'Please Enter valid Password');
	}
	else
	{
		if($('#loginpassword').valid())
  			return true;
			
		if($('#confirmpassword').valid())
  			return true;			
		alert(caccount);
	}
    
  });
});
//credit hide and show
$('#1defaulthtml1').hide();
$('.xbankrupt').hide(); 
$('.xbankrupt1').show();
$('#CreditHistory1').change(function () {
        var choice = $(this).val();
        if (choice == '1 default' || choice == '2 defaults' || choice == '3 or more defaults') {
            $('.xbankrupt').hide();
            $('#1defaulthtml1').show('1000');
        }
        if (choice == 'Ex-bankrupt' || choice == 'Past Part IX debt agreement') {
            $('#1defaulthtml1').hide();
            $('.xbankrupt').show('1000');
        }
		if (choice == 'Clean (no default)' || choice == 'Under bankruptcy' || choice == 'Under Part IX debt agreement') {
            $('#1defaulthtml1').hide();
            $('.xbankrupt').hide();
		}
});

// google places autocomplete 
$(document).on('focusin','#ResidentialAddress1, #ResidentialAddress2', function(){
	var id=$(this).attr('id');  //alert (id);
	if(id=='ResidentialAddress1'){
		n=1;
		input=document.getElementById('ResidentialAddress1');
	}
	else{
		n=2;
		input=document.getElementById('ResidentialAddress2');
	}
	//alert ('gg');	
	  var autocomplete = new google.maps.places.Autocomplete(input, { types: [ 'geocode' ], componentRestrictions: {country: 'au'}
 });
 
 google.maps.event.addListener(autocomplete, 'place_changed', function() {
        var place = autocomplete.getPlace();
	
	//var place = autocomplete.getPlace();
    var components = place.address_components;
	for (var i = 0, component; component = components[i]; i++) {
        console.log(component);
		if (component.types[0] == 'locality') {
            suburb = component['long_name'];
			$("#Suburb"+n).val(suburb);
			
        }
        if (component.types[0] == 'administrative_area_level_1') {
            state = component['short_name'];
			$("#State"+n).val(state);
        }
		if (component.types[0] == 'postal_code') {
            postcode = component['long_name'];
			$("#Postcode"+n).val(postcode);
        }
		
    }
   // alert('suburb: ' + suburb);
	//alert('state: ' + state);
	//alert('postcode: ' + postcode);
	$('#Property1Address').val($('#ResidentialAddress1').val());
    $('#Property1Suburb').val($('#Suburb1').val());
    $('#Property1State').val($('#State1').val());
    $('#Property1Postcode').val($('#Postcode1').val());
	
	
	
    });	
});

</script> 
      </div>
      <div id="footer">
        <div class="row-fluid">
         <p>&nbsp;</p>
        </div>
        <p class="text-center">
          <button type="button" class="btn btn-white btn-large" data-toggle="modal" data-target="#warningModal"><i class="fa fa-exclamation-triangle"></i> Warning about borrowing</button>
        </p>
        <p class="text-center"> <small>© 2013 Max Cash Limited. All rights reserved.</small> </p>
        <div class="modal fade" id="warningModal" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display:none">
          <div class="modal-dialog">
            <div class="modal-content">
            <div class="modal-header" style="height:20px;"><p align="right">
            <a id="warningClose" data-dismiss="modal" href="#">close </a>
            </p></div>
              <div class="modal-body" style="max-height: 450px">
              
              <div class="well">
              <div class="row-fluid" style="margin-left:0px;">
              <div class="span6 text-center"><a href="#" class="btn btn-green customer" id="newCustomerbtn" data-dismiss="modal"><i class="fa fa-user"></i> I am a new customer</a></div>
              <div class="span6 text-center"><a href="account/index.php?login" class="btn btn-primary customer1"><i class="fa fa-refresh"></i> I am returning customer</a></div>
              </div>
              </div>
              
                <div id="warningText" style="font-size:14px; font-family:Arial, Helvetica, sans-serif"></div>
                <script type="text/javascript"  src="assets/js/warning.js"></script> 
              </div>
              <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
              </div>
            </div>
          </div>
        </div>
        <div id="warningText"></div>
      </div>
    </div>
  </div>
</div>
 <div id="tech-help-panel" style="width:240px;">
 <div style="width:190px; height:140px; float:left; border:5px solid #1788c9; overflow:hidden; background:#1788c9 ">
 <textarea id="clientmsg" placeholder="e.g. form won’t submit, won’t go next page, Other form errors" style="overflow:hidden; height:85px; width:100%; font:12px Arial; resize:vertical;"></textarea>
 <p style="text-align:center; margin:2px;"><span id="talktous">Send</span></p>
 <p id="tech-help-success" style="color:#EFEFEF; text-align:center"></p>
 </div>
 </div>
<!-- Start Live Chat Code --> 

<!--<script type="text/javascript" src="live-chat/templates/js/jquery.validate.min.js"></script> 
<script type="text/javascript" src="live-chat/templates/js/main.min.js"></script> 
<script type="text/javascript">$(function(){$("<link>").attr({href: "live-chat/templates/css/live_chat.css", rel: "stylesheet"}).appendTo("head");$("body").append($("<div>").load("live-chat/live_chat.php",function(){live_chat("live-chat/");}));});</script> -->
<!-- End Live Chat Code --> 

<!-- VisitorVoice --> 
<!--<script type="text/javascript">
var _vvb = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'www.morgancash.com.au/2013/visitor-voice';
var formId = 'feedback_form';

function loadVV() {
  var vvjs = document.createElement('script'); vvjs.type = 'text/javascript'; 
  vvjs.src = _vvb + '/code/'+ formId +'.js';   
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(vvjs, s);
};

if (window.addEventListener) window.addEventListener('load', loadVV, false); 
else if (window.attachEvent) window.attachEvent('onload', loadVV);
</script>--> 
<!-- VisitorVoice -->

<script>

$('#fbconnect').click(function(e) {
							   $('.pass').toggle('hide');
	e.preventDefault();
	
//  window.open("http://maxcash.com.au/chatpop.html","","width=640,height=460");
	var fdata = $(this).attr('data');
	if(fdata == 'disabled')
	{
		e.preventDefault();
		$(this).attr('style', 'cursor:not-allowed;');
		return false;
	}
	else
	{
		fbpopup = window.open("hoauth/social_hub/login.php?provider=facebook","","width=640,height=340");
	}
	//fbpopup = window.open("hauth/signin_signup/index.php?route=authentications/authenticatewith/facebook","","width=640,height=340");
});

$('#diff_social').click(function(e) {
	e.preventDefault();

	fbpopup = window.open("hoauth/signin_signup/index.php?route=authentications/differentaccount/facebook","","width=640,height=340");
	

});

$('#social_logout').click(function(e) {
	e.preventDefault();

	fbpopup = window.open("hoauth/social_hub/logout.php?provider=facebook","","width=640,height=340");
	

});

$("#tech-help-btn").click( function(event){
		if ($("#tech-help-btn").hasClass("isOpen") ) {
			$("#tech-help-panel").stop().animate({'left':"-200px"}, 200);          
			$("#tech-help-btn").removeClass("isOpen");
		} else {
			$("#tech-help-panel").stop().animate({'left':"0px"}, 200);   
			$("#tech-help-btn").addClass("isOpen");
		}

	});

    $('#talktous').click(function () {
        var message = $("#clientmsg").val();
        var agt = window.navigator.userAgent;
        var pageaddress = $(location).attr('href');
        if (message != '') {
            $('#help2').hide();
            $('#help3').show();
            $.ajax({
                type: "POST",
                url: "talktous.php",
                data: {
                    message: message,
                    agt: agt,
                    pageaddress: pageaddress
                },
                success: function (html) {
                    if (html == "success") {
						$('#clientmsg').hide();
						$('#clientmsg').next('p').hide();
						$('#tech-help-success').html("<strong>Can't Submit Form?</strong><br>If you are experiencing technical problems, please complete our<br><strong><a href='http://www.maxfinance.com.au/application/compatible-form.html' style='color:#efefef'>100% device compatible form</a></strong><br><br><strong>Contact our Helpdesk</strong><br>Ph 1300 997 997<br>9:30am to 5:45pm (EST) M-F")
						
                    }
                    else {	
                    }
                }
            }); //end $.ajax 
        }
        else {
            alert('Please tell us what is the issue so we can better assist you (the more detailed the better)');
        }



    });
	
	
    $(window).load(function(){
        $('#warningModal').modal('show');
    });
    </script>
    
    <script type="text/javascript" src="minify/min/?b=assets/js&amp;f=jquery.multiselect.js,jquery.bgiframe.js,jquery.blockUI.js,jquery.mask.min.js,date.js,jquery.lat.validate.js,jquery.form.wizard.js,customfunctions_new.js,cost.js,purl.js"></script>
</body>
</html>